using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools
{
    /// <summary>
    /// <para>Apply Grid Layout</para>
    /// <para>Apply the grid layout to a diagram</para>
    /// <para>将网格布局应用于关系图</para>
    /// </summary>    
    [DisplayName("Apply Grid Layout")]
    public class ApplyGridLayout : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ApplyGridLayout()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_diagram_layer">
        /// <para>Input Network Diagram Layer</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        public ApplyGridLayout(object _in_network_diagram_layer)
        {
            this._in_network_diagram_layer = _in_network_diagram_layer;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Apply Grid Layout";

        public override string CallName => "un.ApplyGridLayout";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_network_diagram_layer, _are_containers_preserved.GetGPValue(), _cell_width_absolute, _cell_height_absolute, _out_network_diagram_layer, _run_async.GetGPValue()];

        /// <summary>
        /// <para>Input Network Diagram Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network Diagram Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_diagram_layer { get; set; }


        /// <summary>
        /// <para>Preserve container layout</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve container layout")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _are_containers_preserved_value _are_containers_preserved { get; set; } = _are_containers_preserved_value._false;

        public enum _are_containers_preserved_value
        {
            /// <summary>
            /// <para>PRESERVE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE_CONTAINERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>IGNORE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IGNORE_CONTAINERS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Cell Width</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Width")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _cell_width_absolute { get; set; } = "2 Unknown";


        /// <summary>
        /// <para>Cell Height</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Height")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _cell_height_absolute { get; set; } = "2 Unknown";


        /// <summary>
        /// <para>Output Network Diagram</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network Diagram")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_network_diagram_layer { get; set; }


        /// <summary>
        /// <para>Run in asynchronous mode on the server</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Run in asynchronous mode on the server")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _run_async_value _run_async { get; set; } = _run_async_value._false;

        public enum _run_async_value
        {
            /// <summary>
            /// <para>RUN_ASYNCHRONOUSLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RUN_ASYNCHRONOUSLY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>RUN_SYNCHRONOUSLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RUN_SYNCHRONOUSLY")]
            [GPEnumValue("false")]
            _false,

        }

        public ApplyGridLayout SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}